Automatic clustering of tokens from a corpus for grammar acquisition

ABSTRACT

A method of grammar learning from a corpus comprises, for the other non-context words, generating frequency vectors for each non-context token in a corpus based upon counted occurrences of a predetermined relationship of the non-context tokens to identified context tokens. Clusters are grown from the frequency vectors according to a lexical correlation among the non-context tokens.

PRIORITY APPLICATION

The present application is a continuation of and claims priority to U.S.patent application Ser. No. 09/912,461, filed Jul. 26, 2001 now U.S.Pat. No. 6,751,584, the contents of which are incorporated herein byreference.

BACKGROUND

The present invention relates to an application that builds linguisticmodels from a corpus of speech.

For a machine to comprehend speech, not only must the machine identifyspoken (or typed) words, but it also must understand language grammar tocomprehend the meaning of commands. Accordingly, much research has beendevoted to the construction of language models that a machine may use toascribe meaning to spoken commands. Often, language models arepreprogrammed. However, such predefined models increase the costs of aspeech recognition system. Also, the language models obtained therefromhave narrow applications. Unless a programmer predefines the languagemodel to recognize a certain command, the speech recognition system thatuses the model may not recognize the command. What is needed is atraining system that automatically extracts grammatical relationshipsfrom a predefined corpus of speech.

SUMMARY

An embodiment of the present invention provides a method of learninggrammar from a corpus, in which context words are identified from acorpus. For the other non-context words, the method counts theoccurrence of predetermined relationships with the context words, andmaps the counted occurrences to a multidimensional frequency space.Clusters are grown from the frequency vectors. The clusters representclasses of words; words in the same cluster possess the same lexicalsignificance and provide an indicator of grammatical structure.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flow diagram of a method of an embodiment of the presentinvention.

FIG. 2 illustrates mapping frequency vectors that may be obtained duringoperation of the present invention.

FIG. 3 illustrates an exemplary cluster tree.

DETAILED DESCRIPTION

Embodiments of the present invention provide a system that automaticallybuilds a grammatical model from a corpus of speech. The presentinvention uses clustering to group words and/or phrases according totheir lexical significance. Relationships between high frequency wordscalled Acontext words@ and other input words are identified. The wordsto be clustered are each represented as a feature vector constructedfrom the identified relationships. Similarities between two input wordsare measured in terms of the distance between their feature vectors.Using these distances, input words are clustered according to ahierarchy. The hierarchy is then cut at a certain depth to produceclusters which are then ranked by a “goodness” metric. Those clustersthat remain identify words or tokens from the corpus that possesssimilar grammatical significance.

Clustering per se is known. In the context of language modeling,clustering has typically been used on words to induce classes that arethen used to predict smoothed probabilities of occurrence for rare orunseen events in the training corpus. Most clustering schemes use theaverage entropy reduction to decide when two words fall into the samecluster. Prior use of clustering, however, does not provide insight intolanguage model of grammar.

FIG. 1 illustrates a method of the present invention according to afirst embodiment. The method operates upon input text, a set of wordsfrom which the grammar model shall be constructed. Typically, the inputtext comprises a set of single words or phonemes. From the input text,the method identifies context words (Step 1010). Context words are thosewords or phonemes in the input text that occur with the highestfrequency. The method 1000 may cause a predetermined number of words(say, 50) that occur with the highest frequency to be identified ascontext words.

The method 1000 determines relationships that may exist between thecontext words and the remaining words, called “input words” herein, inthe input text. For example, the method 1000 may determine how manytimes and in which positions an input word appears adjacent to a contextword. Table 1 below illustrates relationships that may exist betweencertain exemplary input words and exemplary context words.

TABLE 1 Context Word to from in Input Word −2 −1 1 2 −2 −1 1 2 −2 −1 1 2Chicago f₁₁₁ f₁₁₂ f₁₁₃ f₁₁₄ f₁₂₁ f₁₂₂ f₁₂₃ f₁₂₄ f₁₃₁ f₁₃₂ f₁₃₃ f₁₃₄ NewYork f₂₁₁ f₂₁₂ f₂₁₃ f₂₁₄ f₂₂₁ f₂₂₂ f₂₂₃ f₂₂₄ f₂₃₁ f₂₃₂ f₂₃₃ f₂₃₄Baltimore f₃₁₁ f₃₁₂ f₃₁₃ f₃₁₄ f₃₂₁ f₃₂₂ f₃₂₃ f₃₂₄ f₃₃₁ f₃₃₂ f₃₃₃ f₃₃₄red f₄₁₁ f₄₁₂ f₄₁₃ f₄₁₄ f₄₂₁ f₄₂₂ f₄₂₃ f₄₂₄ f₄₃₁ f₄₃₂ f₄₃₃ f₄₃₄ whitef₅₁₁ f₅₁₂ f₅₁₃ f₅₁₄ f₅₂₁ f₅₂₂ f₅₂₃ f₅₂₄ f₅₃₁ f₅₃₂ f₅₃₃ f₅₃₄ blue f₆₁₁f₆₁₂ f₆₁₃ f₆₁₄ f₆₂₁ f₆₂₂ f₆₂₃ f₆₂₄ f₆₃₁ f₆₃₂ f₆₃₃ f₆₃₄Each entry of the table, f_(ijk) represents, for a given input word i;how many times a context word C; and non-context word i; appears withina predetermined relationship. Thus, f₁₁₁-F₁₁₄ each represent the numberof times the input word “Chicago” and the context word “to” appearwithin adjacencies of −2 words, −1 word, +1 word and +2 wordsrespectively.

Based upon the frequencies, an N dimensional vector may be built foreach input word (step 1020). The number of dimensions N of the frequencyvector is a multiple of the total number of context words, the totalnumber of input words and the total number of relations identified bythe method 1000. The vector represents grammatical links that existbetween the input words and the context words. Thus, each input wordmaps to an N dimensional frequency space. A representative frequencyspace is shown in FIG. 2 (N=3).

The method 1000 builds clusters of input words (Step 1030). According tothe principles of the present invention, input words having the samelexical significance should possess similar vectors in the frequencyspace. Thus, it is expected that city names will exhibit frequencycharacteristics that are similar to each other but different from otherinput words having a different lexical significance. They will beincluded in a cluster (say, cluster 10, FIG. 2). So, too, with colors.They will be included in another cluster (say, cluster 20). Where wordsexhibit similar frequency significance, they are included within asingle cluster.

As is known, a cluster may be represented in an N-dimensional frequencyspace by a centroid coordinate and a radius indicating the volume of thecluster. The radius indicates the “compactness” of the elements within acluster. Where a cluster has a small radius, it indicates that theelements therein exhibit a very close relationship to each other in thefrequency space. A larger radius indicates fewer similarities betweenelements in the frequency space.

The similarity between two words may be measured using the Manhattandistance metric between their feature vectors. Manhattan distance isbased on the sum of the absolute value of the differences among thevector=s coordinates. Alternatively, Euclidean and maximum metrics maybe used to measure distances. Experimentally, the Manhattan distancemetric was shown to provide better results than the Euclidean or maximumdistance metrics.

Step 1030 may be applied recursively to grow clusters from clusters.That is, when two clusters are located close to one another in the Ndimensional space, the method 1000 may enclose them in a single clusterhaving its own centroid and radius. The method 1000 determines adistance between two clusters by determining the distance between theircentroids using one of the metrics discussed above with respect to thevectors of input words. Thus, the Manhattan, Euclidean and maximumdistance metrics may be used.

A hierarchical “cluster tree” is grown representing a hierarchy of theclusters. At one node in the tree, the centroid and radius of a firstcluster is stored. Two branches extend from the node to other nodeswhere the centroids and radii of subsumed clusters are stored. Thus, thetree structure maintains the centroid and radius of every cluster builtaccording to Step 1030. Step 1030 recurs until a single, allencompassing cluster encloses all clusters and input words. This clusteris termed the “root cluster” because it is stored as the root node ofthe cluster tree. An exemplary cluster tree is shown in FIG. 3.

As will be appreciated, the root cluster N13 has a radius large enoughto enclose all clusters and input words. The root cluster, therefore,possesses very little lexical significance. By contrast, “leafclusters,” those provided at the ends of branches in the cluster tree,possess very strong lexical significance.

At Step 1040, the method 1000 cuts the cluster tree along apredetermined line in the tree structure. The cutting line separateslarge clusters from smaller clusters. The large clusters are discarded.What remains are smaller clusters, those with greater lexicalsignificance.

The cutting line determines the number of clusters that will remain. Onemay use the median of the distances between clusters merged at thesuccessive stages as a basis for the cutting line and prune the clustertree at the point where cluster distances exceed this median value.Clusters are defined by the structure of the tree above the cutoffpoint.

Finally, the method 1000 ranks the remaining clusters (Step 1050). Thelexical significance of a particular cluster is measured by itscompactness value. The compactness value of a cluster simply may be itsradius or an average distance of the members of the cluster from thecentroid of the cluster. Thus, the tighter clusters exhibiting greaterlexical significance will occur first in the ranked list of clusters andthose exhibiting lesser lexical significance will occur later in thelist. The list of clusters obtained from Step 1050 is a grammaticalmodel of the input text.

The method 1000 is general in that it can be used to cluster “tokens” atany lexical level. For example, it may be applied to words and/orphrases. Table 2 illustrates the result of clustering words and Table 3illustrates the result of clustering phrases as performed on anexperimental set of training data taken from the How May I Help You?Training corpus disclosed in Gorin, et al., “How May I Help You?,” vol.23, Speech Communication, pp. 113-127 (1997). Other lexicalgranularities (syllables, phonemes) also may be used.

TABLE 2 Results of Clustering Words from AT&T's How May I Help You ?Corpus Class Compactness Index Value Class Members C363 0.131 make placeeight eighty five four nine oh one seven six three two C118 0.18 zeroC357 0.19 bill charge C260 0.216 an and because but so when C300 0.233 KO ok C301 0.236 From please C277 0.241 again here C202 0.252 as it'sC204 0.263 different third C77 0.268 number numbers C275 0.272 Needneeded want wanted C256 0.274 assistance directory information C1970.278 all before happened C68 0.278 ninety sixty C41 0.29 his our thetheir C199 0.291 called dialed got have as by in no not now of orsomething that that's there C27 0.296 whatever working C327 0.296 I I'mI've canada england france germany israel italy japan C48 0.299 londonmexico paris C69 0.308 back direct out through C143 0.312 connectedgoing it arizona california carolina florida georgia illinois islandjersey maryland michigan missouri ohio pennsylvania C89 0.314 virginiawest york C23 0.323 be either go see somebody them C90 0.332 about meoff some up you

TABLE 3 Results from a First Iteration of Combining Phrase Acquisitionand Clustering from the How May I Help You? Corpus (Words in a Phraseare Separated by a Colon). Class Compactness Index Value Class MembersD365 0.226 wrong:C77 second D325 0.232 C256:C256 C256 D380 0.239area:code:C118:C118:C118:C118:C118 C68 D386 0.243 A:C77 this:C77 D3820.276 C260:C357:C143:to:another C260:C357:C143:to:my:home D288 0.281C327:C275:to:C363 I'd:like:toC363 to:363 yes:I'd:like:to:C363 D186 0.288good:morning yes:ma'am yes:operator hello hi ma'am may well D148 0.315problems trouble D87 0.315 A:T:C260:T C260:C327 C27:C27 C41:C77 C118C143 C260 C197 C199 C202 C23 C260 C27 C277 C301 C69 C77 C90 operator toD183 0.321 C118:C118:hundred C204 telephone D143 0.326 new:C89 C48 C89colorado massachusetts tennessee texas D387 0.327 my:home my:home:phoneD4 0.336 my:calling my:calling:card my:card D70 0.338 C199:a:wrong:C77misdialed D383 0.341 like:to:C363 trying:to:C363 would:like:to:C363 D3810.347 like:to:C363:a:collect:call:to like:to:C363:collect:callwould:like:to:C363:a:collect:call would:like:to:C363:a:collect:callwould:like:to:C363:a:collect:call:to D159 0.347 C118:C118 C118:C118:C118C118:C118:C118:C118:C118:C118 C118:C118:C118:C118:C118:C118:C118C118:C118:C118:C118:C118:C118:C118:C118: C118:C118C:118:C118:C118:C118:C118:C118:C118:C118: C118:C118:C118area:code:C118:C118:C118 C300

Adjacency of words is but one relationship that the method 1000 may beapplied to recognize from a corpus. More generally, however, the method1000 may be used to recognize predetermined relationships among tokensof the corpus. For example, the method 1000 can be configured torecognize words that appear together in the same sentences or words thatappear within predetermined positional relationships with punctuation.Taken even further, the method 1000 may be configured to recognizepredetermined grammatical constructs of language, such as subjectsand/or objects of verbs. Each of these latter examples of relationshipsmay require that the method be pre-configured to recognize thegrammatical constructs.

Several embodiments of the present invention are specificallyillustrated and described herein. However, it will be appreciated thatmodifications and variations of the present invention are covered by theabove teachings and within the purview of the appended claims withoutdeparting from the spirit and intended scope of the invention.

1. A machine-readable medium having stored thereon executableinstructions that when executed by a processor, cause the processor to:generate frequency vectors for each non-context token in a corpus basedupon counted occurrences of a predetermined relationship of thenon-context tokens to context tokens; and cluster the non-context tokensinto a cluster tree based upon the frequency vectors according to alexical correlation among the non-context tokens, wherein the clustertree is used in a pattern recognition system.
 2. A method of grammarlearning from a corpus, comprising: generating frequency vectors foreach non-context token in a corpus based upon counted occurrences of apredetermined relationship of the non-context tokens to context tokens;and clustering the non-context tokens based upon the frequency vectorsaccording to a lexical correlation among the non-context tokens, whereinthe cluster tree is used in a pattern recognition system.
 3. The methodof claim 2, wherein the step of clustering further comprises clusteringthe non-context tokens into a cluster tree.
 4. The method of claim 3,wherein the cluster tree represents a grammatical relationship among thenon-context tokens.
 5. The method of claim 3, further comprising cuttingthe cluster tree along a cutting line to separate large clusters fromsmall clusters.
 6. The method of claim 2, wherein small clusters areranked according to a compactness value.
 7. The method of claim 2,wherein the predetermined relationship is a measure of adjacency.
 8. Themethod of claim 2, wherein the clustering is performed based onEuclidean distances between the frequency vectors.
 9. The method ofclaim 2, wherein the clustering is performed based on Manhattandistances between the frequency vectors.
 10. The method of claim 2,wherein the clustering is performed based on maximum distance metricsbetween the frequency vectors.
 11. The method of claim 2, furthercomprising normalizing the frequency vectors based upon a number ofoccurrences of the non-context token in the corpus.
 12. The method ofclaim 2, wherein the frequency vectors are multi-dimensional vectors,the number of dimensions being determined by the number of contexttokens and a number of predetermined relationships of non-context tokensto the context token being counted.
 13. A file storing a grammar modelof a corpus of speech, created according to a method comprising:generating frequency vectors for each non-context token in a corpusbased upon counted occurrences of a predetermined relationship of thenon-context tokens to context tokens; clustering the non-context tokensinto a cluster based upon the frequency vectors according to a lexicalcorrelation among the non-context tokens; and storing the non-contexttokens and a representation of the clusters in a file for use in apattern recognition system.
 14. The file of claim 13, wherein theclusters may be represented by centroid vectors.
 15. The file of claim13, wherein the predetermined relationship is adjacency.
 16. The file ofclaim 13, wherein the correlation is based on Euclidean distance. 17.The file of claim 13, wherein the correlation is based on Manhattandistance.
 18. The file of claim 13, wherein the correlation is based ona maximum distance metric.
 19. The file of claim 13, wherein thefrequency vectors are normalized based upon the number of occurrences ofthe non-context token in the corpus.
 20. The file of claim 13, whereinthe frequency vectors are multi-dimensional vectors, the number ofdimensions of which is determined by the number of context tokens andthe number of predetermined relationships of non-context tokens tocontext tokens.